Need to grab genes in correct orientation.


robertsmac:bin sr320$ ./ipython notebook

 

http://nbviewer.ipython.org/url/eagle.fish.washington.edu/cnidarian/BiGill_Gene_Methylation.ipynb


^this is getting methylation

Still need to get new Coordinate system (again) for visualization.

SQLShare.

GFF are in with C9 Modified for joining….





Will be modifying CDS gff so that it coordinates are related to genes
Will need to to arithmetic based on strand so that 5' 3' orientation holds true


SELECT cds.*, 
  mRNA.Column4 as mRNA_start, 
  mRNA.Column5 as mRNA_end
  FROM [sr320@washington.edu].[Snapshot of CDS GFF] cds
  LEFT Join [sr320@washington.edu].[oyster_v9_mRNA GFF] mRNA
  on cds.Column9 = mRNA.Column9
  
  Order by Column1 Desc

Create new Dataset



----
correct stuff

SELECT *,
 Case when Column7 = '+'
  then Column4 - mRNA_start + 1
  Else mRNA_end - Column4 + 1
  END as New_Start,
  
  Case when Column7 = '+'
  then Column5 - mRNA_start + 1
  Else mRNA_end - Column5 + 1
  END as New_End,
  
 Column5 - Column4
  as exon_size  -- trying to check arithmetic
  
  FROM 
  [sr320@washington.edu].[CDS GFF with Gene start and stop] cd
  

  Order by Column1 Desc, Column9 --makes it easy to see big genes